Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSDK-7843: Do not remove resources when a remote has a transient error. #4268

Closed
wants to merge 2 commits into from

Conversation

dgottlieb
Copy link
Member

No description provided.

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Aug 6, 2024
@@ -131,7 +131,7 @@ func isClosedPipeError(err error) bool {
}

func (rc *RobotClient) notConnectedToRemoteError() error {
return errors.Errorf("not connected to remote robot at %s", rc.address)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This usage adds a stack trace to the error. I found them to be an eyesore and not at all helpful.

@@ -346,7 +346,10 @@ func (rc *RobotClient) connectWithLock(ctx context.Context) error {
if err := rc.conn.Close(); err != nil {
return err
}
conn, err := grpc.Dial(ctx, rc.address, rc.logger, rc.dialOptions...)

cancelCtx, stop := context.WithTimeout(ctx, time.Second)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, need to revert this and see if there's a better option for speeding up the test.

@@ -406,6 +409,7 @@ func (rc *RobotClient) checkConnection(ctx context.Context, checkEvery, reconnec
return
}
}
rc.logger.Info("Waiting to recheck. WaitTime:", waitTime)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverting

@@ -709,9 +713,8 @@ func (rc *RobotClient) PackageManager() packages.Manager {
return nil
}

// ResourceNames returns a list of all known resource names connected to this machine.
//
// resource_names := machine.ResourceNames()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't know if this served a purpose -- happy to reintroduce if there's some magic documentation thing going on here

for _, resName := range newResources {
remoteResName := resName
res, err := rr.ResourceByName(remoteResName) // this returns a remote known OR foreign resource client
Copy link
Member Author

@dgottlieb dgottlieb Aug 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing changed here. Just code movement. What's important is this is now below oldline 215/newline 208. I hope the comment I added to the new code outlines the significance.

There is no test coverage of the error case here.

@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Aug 6, 2024
maximpertsov added a commit to maximpertsov/rdk that referenced this pull request Aug 9, 2024
maximpertsov added a commit to maximpertsov/rdk that referenced this pull request Aug 9, 2024
maximpertsov added a commit to maximpertsov/rdk that referenced this pull request Aug 20, 2024
maximpertsov added a commit to maximpertsov/rdk that referenced this pull request Aug 21, 2024
maximpertsov added a commit to maximpertsov/rdk that referenced this pull request Sep 16, 2024
maximpertsov added a commit to maximpertsov/rdk that referenced this pull request Sep 17, 2024
maximpertsov added a commit to maximpertsov/rdk that referenced this pull request Sep 18, 2024
maximpertsov added a commit to maximpertsov/rdk that referenced this pull request Sep 23, 2024
maximpertsov added a commit to maximpertsov/rdk that referenced this pull request Sep 24, 2024
maximpertsov added a commit to maximpertsov/rdk that referenced this pull request Sep 24, 2024
@maximpertsov maximpertsov removed their request for review September 30, 2024 14:08
@maximpertsov
Copy link
Contributor

this change is incorporated into #4273, so I'm removing myself as a reviewer

maximpertsov added a commit to maximpertsov/rdk that referenced this pull request Oct 3, 2024
maximpertsov added a commit to maximpertsov/rdk that referenced this pull request Oct 4, 2024
@dgottlieb dgottlieb closed this Oct 24, 2024
@dgottlieb dgottlieb deleted the RSDK-7843 branch October 24, 2024 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants